package net.crazyadam.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import net.crazyadam.R;

/**
 * Copyright by <a href="http://crazyadam.net"><em><i>Joseph J.C. Tang</i></em></a> <br/>
 * Email: <a href="mailto:jinntrance@gmail.com">jinntrance@gmail.com</a>
 *
 * @author joseph
 * @version 1.0
 * @since 9/17/12 6:35 PM
 */
public class Main extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.m);
//        SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();
//        editor.putString(Constant.RESULT, null);
//        editor.putString(Constant.BASE_FREQUENCY_WIDTH, null);
//        editor.putString(Constant.MAX_FREQUENCY_WIDTH, null);
//        editor.commit();
    }

    @Override
    protected void onResume() {
        super.onResume();
        TextView m = (TextView) findViewById(R.id.width);
        TextView list = (TextView) findViewById(R.id.listView);
/*        String baseWidth = PreferenceManager.getDefaultSharedPreferences(this).getString(Constant.BASE_FREQUENCY_WIDTH, null);
        String width = PreferenceManager.getDefaultSharedPreferences(this).getString(Constant.MAX_FREQUENCY_WIDTH, null);
        if (null != baseWidth && null != width) {
            Float delta = Float.parseFloat(width) - Float.parseFloat(baseWidth);
            m.setText(delta.toString());
        }
        list.setText(PreferenceManager.getDefaultSharedPreferences(this).getString(Constant.RESULT, null));*/
    }
    public void openGenerator(View view) {
        Bundle bundle=new Bundle();
        TextView v = (TextView) findViewById(R.id.userId);
        int id =Integer.parseInt(String.valueOf(v.getText()));
        bundle.putInt("id",id);
        Intent intent = new Intent(this, PlaySound.class);
        startActivity(intent);
    }
    public void openSender(View view) {
        startActivity(new Intent(this, SenderActivity.class));
    }
}